// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------

import request from '@/utils/request'

/**
 * 商家分页列表
 * @param pram
 */
export function shopListApi(data) {
  return request({
    url: '/admin/system/shop/list',
    method: 'get',
    params: data
  })
}

/**
 * 商家数量
 * @param pram
 */
export function shopGetCountApi() {
  return request({
    url: '/admin/system/shop/getCount',
    method: 'get'
  })
}

/**
 * 商家商家状态
 * @param pram
 */
export function shopUpdateStatusApi(data) {
  return request({
    url: '/admin/system/shop/update/status',
    method: 'get',
    params: data
  })
}

/**
 * 商家商家刪除
 * @param pram
 */
export function shopDeleteApi(data) {
  return request({
    url: '/admin/system/shop/delete',
    method: 'get',
    params: data
  })
}

/**
 * 商家商家回收站刪除
 * @param pram
 */
export function allDeleteApi(params) {
  return request({
    url: '/admin/system/shop/completely/delete',
    method: 'get',
    params
  })
}

/**
 * 商家添加
 * @param pram
 */
export function shopSaveApi(data) {
  return request({
    url: '/admin/system/shop/save',
    method: 'post',
    data
  })
}

/**
 * 商家详情
 * @param pram
 */
export function shopInfoApi(data) {
  return request({
    url: '/admin/system/shop/info',
    method: 'get',
    params: data
  })
}

/**
 * 商家修改
 * @param pram
 */
export function shopUpdateApi(data,id) {
  // const param = ;
  return request({
    url: '/admin/system/shop/update',
    method: 'post',
    params: {id: id},
    data
  })
}

/**
 * 商家恢复
 * @param pram
 */
export function shopRecoveryApi(params) {
  return request({
    url: '/admin/system/shop/recovery',
    method: 'get',
    params
  })
}

// 挂单

export function cashHangList(params) {
  return request({
    url: '/admin/cashier/hangUpList',
    method: 'get',
    params
  })
}
export function cashHangSave(data) {
  return request({
    url: '/admin/cashier/saveHangUp',
    method: 'post',
    data
  })
}
// 积分订单兑换列表
export function exchangeOrderList(params) {
  return request({
    url: '/admin/store/order/exchangeOrderList',
    method: 'get',
    params
  })
}

export function updateExchangeOrder(data) {
  return request({
    url: '/admin/store/order/exchangeOrderSend',
    method: 'post',
    data
  })
}








